
#include <pthread.h>
#include <stdio.h>
#include "sys_log.h"

#include "server.h"


int main()
{

	int ret = 0;
	pthread_t th1 = 0,th2 = 0;
	struct producer_consumer *pool = NULL;


	serverSocket = create_socket("127.0.0.1",6868);
	LOG_I("socket create\n");

	pool = model_init(10);

    ret = pthread_create(&th1,NULL,producer,pool);
	if(ret != 0)
	{
		printf("pthread_create error\n");
		exit(-1);
	}
    ret = pthread_create(&th2,NULL,consumer,pool);
	if(ret != 0)
	{
		printf("pthreadjjj_create error\n");
		exit(-1);
	}

	LOG_I("two threads finished\n");

	while(1)
	{
	}

	destroy_model(pool);

	return 0;
}
